; Music of Soccer Challenge (1990) (Alternative Software)
; Ripped by Megachur the 11/05/2011

	write "SOCCERCH.BIN"

music_date_rip	equ &115b
music_adr	equ &956a
first_theme	equ 0
last_theme	equ 0

	read "music_header_v1_0.asm"
;
.play_music
;
.l956a
jp l958d
;
.init_music
.l956d
;
jp l982e
jp l97a8
jp l95d7
.l957d equ $ + 7
.l9579 equ $ + 3
.l9578 equ $ + 2
db #08,#08,#00,#c9,#c9,#c9,#00,#40
.l957e
ld hl,#0000
ld (l9593),hl
ld c,#07
ld a,#2a
call l994e
jr l9595
.l958d
push af
push bc
push de
push hl
push ix
.l9593
jr l957e
.l9595
call l983a
call l97f1
ld hl,l9703
ld a,(hl)
ld bc,(l957d)
sub c
ld (hl),a
sbc a
ld (l9702),a
jr nc,l95af
ld a,#f0
add (hl)
ld (hl),a
.l95af
call l9704
ld ix,l95ef
call l9635
ld ix,l9601
call l9635
ld ix,l9613
call l9635
sub a
ld (l9702),a
ld c,#00
call l9978
pop ix
pop hl
pop de
pop bc
pop af
ret
.l95d7
push af
push bc
push de
push hl
sub a
ld (l9578),a
ld hl,l9a20
ld (l979e),hl
call l986b
pop hl
pop de
.l95ea
pop bc
pop af
ret
.l95ed
db #ff,#ff
.l95ef
dw l95ed
db #00,#00,#04,#0a
.l95f5
dw l95ed
.l95fd equ $ + 6
.l95fc equ $ + 5
.l95f9 equ $ + 2
.l95f8 equ $ + 1
.l95f7
db #00,#02,#00,#00,#01,#01,#00,#00
.l9600 equ $ + 1
db #00,#00
.l9601
dw l95ed
db #00,#00,#00,#08
.l9607
dw l95ed
.l960a equ $ + 1
.l9609
db #01,#02
.l960b
dw l95ea
.l9612 equ $ + 5
.l960f equ $ + 2
.l960e equ $ + 1
db #01,#01,#00,#08,#00,#00
.l9613
dw l95ed
db #00,#00,#02,#09
.l9619
dw l95ed
.l961c equ $ + 1
.l961b
dw #0200
.l961d
dw l95ea
.l9624 equ $ + 5
.l9621 equ $ + 2
.l9620 equ $ + 1
db #01,#01,#00,#05,#00,#00
db #38,#73,#39,#30,#41,#49,#48,#49
db #30,#60,#3e,#58,#79,#7c,#75,#89
.l9635
call l9694
dec (ix+#0d)
ret nz
ld a,(ix+#0c)
ld (ix+#0d),a
ld l,(ix+#00)
ld h,(ix+#01)
ld a,(hl)
inc hl
inc a
jr z,l9685
dec a
ld c,(ix+#05)
call l9947
ld a,(hl)
inc hl
ld (ix+#00),l
ld (ix+#01),h
ld b,a
ld a,(ix+#0f)
and #03
jr z,l9670
ld a,#1f
sub b
ld c,#06
bit 2,(ix+#0f)
call nz,l994e
.l9670
ld a,(ix+#02)
add (ix+#03)
ld (ix+#02),a
add b
call l989f
ex de,hl
ld c,(ix+#04)
call l993a
ret
.l9685
bit 1,(ix+#0f)
ret z
res 1,(ix+#0f)
ld (ix+#0e),a
jp l994e
.l9694
ld a,(l9702)
or a
ret z
dec (ix+#08)
ret nz
ld a,(ix+#09)
ld (ix+#08),a
ld l,(ix+#06)
ld h,(ix+#07)
ld a,(hl)
inc a
ret z
inc hl
dec a
ld (ix+#06),l
ld (ix+#07),h
or a
ret z
bit 1,(ix+#0f)
ret nz
bit 0,(ix+#0f)
jr nz,l96e6
rlca
rlca
ld hl,l98c4
add (hl)
ld l,(ix+#0a)
ld h,(ix+#0b)
add (hl)
inc hl
ld (ix+#02),a
.l96d2
call l9935
ld (ix+#0d),#01
ld (ix+#0c),e
ld (ix+#03),d
ld (ix+#00),l
ld (ix+#01),h
ret
.l96e6
dec a
rlca
rlca
ld c,a
ld b,#00
ld hl,l9a82
add hl,bc
call l9935
ld a,(hl)
ld c,#07
call l994e
inc hl
ld a,(hl)
inc hl
ld (ix+#02),a
ex de,hl
jr l96d2
.l9703 equ $ + 1
.l9702
db #00,#00
.l9704
ld a,(l95f7)
dec a
ret nz
ld hl,(l95f5)
ld a,(hl)
inc a
ret nz
ld hl,(l979e)
.l9712
inc hl
ld a,(hl)
dec hl
cp #00
jr nz,l973f
ld a,(hl)
inc hl
inc hl
cp #0b
jr z,l976e
cp #40
jr z,l977e
cp #34
jr z,l9761
cp #0d
jr z,l9787
cp #c9
jr z,l9798
cp #35
jr z,l978f
ld hl,l9a20
ld (l979e),hl
.l973a
sub a
.l973c equ $ + 1
ld (l9578),a
ret
.l973f
call l97a2
ld (l95f8),a
ld (l95f5),de
call l97a2
ld (l960a),a
ld (l9607),de
call l97a2
ld (l961c),a
ld (l9619),de
ld (l979e),hl
ret
.l9761
call l9935
ex de,hl
ld (l97a0),de
ld (l979e),hl
jr l9712
.l976e
call l9935
ld (l95f9),de
call l9935
ld (l960b),de
jr l9712
.l977e
call l9935
ld (l961d),de
jr l9712
.l9787
ld a,(hl)
ld (l98c4),a
inc hl
inc hl
jr l9712
.l978f
ld a,(hl)
ld (l957d),a
inc hl
inc hl
jp l9712
.l9798
ld hl,(l97a0)
jp l9712
.l979e
jr nz,l973a
.l97a0
jr nz,l973c
.l97a2
call l9935
ld a,(de)
inc de
ret
.l97a8
push af
push bc
push de
push hl
push ix
call l97b8
pop ix
pop hl
pop de
pop bc
pop af
ret
.l97b8
dec a
cp #06
ret nc
ld c,a
rlca
rlca
add c
add c
ld c,a
ld b,#00
ld hl,l99a0
add hl,bc
ld a,(hl)
inc hl
ld ix,l95ef
cp #01
jr z,l97de
ld ix,l9601
cp #02
jr z,l97de
ld ix,l9613
.l97de
ld a,(hl)
cp (ix+#0e)
ret c
ld (ix+#11),#00
ld (ix+#0e),a
ld (ix+#10),l
ld (ix+#11),h
ret
.l97f1
ld ix,l95ef
call l9803
ld ix,l9601
call l9803
ld ix,l9613
.l9803
ld h,(ix+#11)
ld a,h
or a
ret z
ld (ix+#11),#00
ld l,(ix+#10)
dec hl
dec hl
ld a,(hl)
ld (ix+#02),a
dec hl
ld a,(hl)
dec hl
dec hl
ld c,#07
bit 2,(ix+#0f)
call nz,l994e
set 1,(ix+#0f)
call l9935
ex de,hl
jp l96d2
.l982e
push af
ld a,#01
ld (l9578),a
ld (l9839),a
pop af
ret
.l9839
nop
.l983a
ld a,(l9839)
or a
ret z
ld de,l9ab5
ld (l979e),de
ld a,#01
ld (l95f7),a
ld (l9609),a
ld (l961b),a
ld (l95fc),a
ld (l960e),a
ld (l9620),a
ld a,#38
ld c,#07
call l994e
sub a
ld (l9702),a
ld (l9703),a
ld (l9839),a
.l986b
ld hl,l95ed
ld (l95f5),hl
ld (l9607),hl
ld (l9619),hl
ld (l95ef),hl
ld (l9601),hl
ld (l9613),hl
sub a
ld (l95fd),a
ld (l960f),a
ld (l9621),a
ld (l9600),a
ld (l9612),a
ld (l9624),a
ld c,#08
sub a
ld h,a
ld l,a
call l994e
inc c
jp l993a
.l989f
push af
push bc
push hl
ld b,#02
sub #04
.l98a6
cp #30
jr c,l98af
sub #30
inc b
jr l98a6
.l98af
ld l,a
ld h,#00
add hl,hl
ld de,l98c5
add hl,de
call l9935
.l98ba
srl d
rr e
djnz l98ba
pop hl
pop bc
pop af
ret
.l98c4
db #70
.l98c5
dw #0eee,#0eb7,#0e81,#0e4b
dw #0e17,#0de3,#0db0,#0d7e
dw #0d4d,#0d1c,#0cec,#0cbc
dw #0c8d,#0c5f,#0c32,#0c05
dw #0bd9,#0bae,#0b83,#0b58
dw #0b2f,#0b06,#0add,#0ab5
dw #0a8e,#0a67,#0a41,#0a1b
dw #09f6,#09d2,#09ae,#098a
dw #0967,#0945,#0923,#0901
dw #08e0,#08bf,#089f,#0880
dw #0861,#0842,#0823,#0806
dw #07e8,#07cb,#07ae,#0792
ld hl,(#2b45)
ld (#3b33),hl
ld a,(#223b)
ld d,d
jr nc,l997b
ld c,e
ld c,(hl)
ld b,a
ld e,e
.l9935
ld e,(hl)
inc hl
ld d,(hl)
inc hl
ret
.l993a
push af
ld a,l
call l994e
inc c
ld a,h
call l994e
dec c
pop af
ret
.l9947
or a
jr z,l994e
srl a
add #08
.l994e
push af
push bc
call l9966
ld b,#f4
out (c),a
ld b,#f6
in a,(c)
or #80
out (c),a
xor #80
out (c),a
pop bc
pop af
ret
.l9966
push af
ld b,#f4
out (c),c
ld bc,#f6c0
in a,(c)
or c
out (c),a
xor c
out (c),a
pop af
ret
.l9978
push bc
push af
push bc
.l997b
ld c,#0e
call l9966
pop bc
pop af
ld b,#f7
ld a,#92
out (c),a
push bc
set 6,c
ld b,#f6
out (c),c
ld b,#f4
in a,(c)
pop bc
push af
ld a,#82
out (c),a
pop af
pop bc
ret
dw l99c0
.l99a0 equ $ + 2
db #28,#28,#00,#02
dw l99cd
db #38,#1e,#01,#01
dw l99cd
db #38,#28,#01,#01
dw l99df
db #38,#e6,#02,#04
dw l99d8
db #38,#98,#02,#02
dw l99d8
db #38,#c8,#02,#02
.l99c0
db #01,#f6,#0d,#0a,#05,#05,#02,#02
.l99cd equ $ + 5
db #01,#00,#00,#00,#ff,#01,#00,#0f
db #0a,#0a,#14,#06,#05,#00,#00,#ff
.l99df equ $ + 7
.l99d8
db #08,#00,#0a,#00,#00,#00,#ff,#01
db #00,#04,#02,#06,#04,#08,#03,#0f
db #02,#0f,#04,#0f,#03,#0f,#07,#0b
db #01,#0f,#03,#0e,#08,#0c,#02,#0f
db #04,#0f,#07,#0b,#03,#0f,#02,#0f
db #07,#0d,#01,#0f,#03,#0f,#07,#0b
db #03,#0f,#02,#0f,#07,#0d,#01,#0f
db #03,#0f,#06,#0c,#02,#0f,#05,#0c
db #05,#0a,#01,#03,#03,#00,#00,#ff
.l9a22 equ $ + 2
.l9a20
db #00,#00,#01,#00,#00,#00,#01,#ff
.l9a28
db #d0,#02,#00,#0f,#00,#05,#00,#04
db #00,#03,#00,#02,#00,#02,#00,#01
db #00,#01,#00,#01,#00,#01,#00,#01
.l9a44 equ $ + 4
db #00,#00,#00,#ff,#00,#01,#00,#0f
db #01,#03,#ff,#07,#00,#05,#00,#04
db #00,#03,#ff,#03,#00,#03,#01,#03
db #00,#03,#ff,#03,#00,#03,#01,#03
db #00,#03,#ff,#02,#00,#02,#01,#02
db #00,#02,#ff,#02,#00,#02,#01,#01
db #00,#01,#ff,#01,#00,#01,#01,#01
db #00,#01,#ff,#01,#00,#01,#01,#00
.l9a82 equ $ + 2
db #01,#ff,#8e,#9a,#28,#1e,#9d,#9a
db #2a,#00,#ac,#9a,#2a,#4a,#02,#fc
db #0c,#0f,#06,#08,#03,#02,#01,#01
db #01,#01,#00,#00,#ff,#02,#f8,#0f
db #1e,#05,#18,#01,#14,#01,#0a,#00
db #00,#00,#01,#ff,#01,#00,#0c,#0f
db #06,#08,#00,#00,#ff
.l9ab5
db #35,#00,#28,#00,#0d,#00,#7a,#00
db #0b,#00
dw l9a44,l9a28,l9b4b,l9b4b
dw l9c77,l9b4b,l9b4b,l9c7c
.l9acf
dw l9b6e,l9c25,l9c69,#0034
dw l9b4e,l9ba0,l9c5b,l9c85
dw l9baa,l9c40,l9c8e,#0034
dw l9bb4,l9b96,l9c25,l9c69
dw #0034
dw l9b4e,l9ba0,l9c5b,l9c97
dw l9baa,l9c40,l9c9c,#0034
dw l9bb4
dw #000b,l9a22,l9a28,#0034
dw l9bb4,#000b,l9a44,l9a28
dw l9c10,l9c25,l9c85,l9c16
dw l9c2e,l9c6e,l9c19,l9c37
dw l9c85,l9c19,l9c40,l9c6e
dw l9c10,l9c25,l9c85,l9c16
dw l9c2e,l9c6e,l9c19,l9c5b
dw l9c85,l9c1f,l9c40,l9c8e
dw #0034,l9bb4,#0034,l9acf
.l9b4b
db #08,#00,#ff
.l9b4e
dw l9b78,l9c2e,l9c6e,l9b82
dw l9c37,l9c85,l9b8c,l9c40
dw l9c6e,l9b96,l9c25,l9c69
dw l9b78,l9c2e,l9c6e
.l9b6e equ $ + 2
db #c9,#00,#01,#0d,#00,#00,#00,#0b
.l9b78 equ $ + 4
db #00,#0d,#0d,#ff,#01,#12,#12,#11
.l9b82 equ $ + 6
db #12,#00,#11,#12,#00,#ff,#01,#14
db #00,#12,#00,#14,#00,#12,#14,#ff
.l9b8c
db #01,#19,#00,#17,#19,#00,#17,#19
.l9b96 equ $ + 2
db #1c,#ff,#01,#0d,#00,#00,#00,#0b
.l9ba0 equ $ + 4
db #00,#0b,#0d,#ff,#01,#14,#00,#14
.l9baa equ $ + 6
db #12,#14,#00,#14,#12,#ff,#01,#0d
db #00,#0b,#0d,#00,#00,#00,#00,#ff
.l9bb4
dw l9be6,l9c49,l9c69,l9bf0
dw l9c2e,l9c6e,l9bfa,l9c52
dw l9c85,l9c00,l9c60,l9c6e
dw l9be6,l9c25,l9c69,l9bf0
dw l9c2e,l9c6e,l9bfa,l9c5b
dw l9c85,l9c0a,l9c40,l9c8e
.l9be6 equ $ + 2
db #c9,#00,#01,#0d,#00,#00,#00,#0b
.l9bf0 equ $ + 4
db #00,#00,#0d,#ff,#01,#12,#00,#12
.l9bfa equ $ + 6
db #12,#12,#00,#00,#00,#ff,#02,#14
.l9c00 equ $ + 4
db #14,#14,#19,#ff,#01,#19,#00,#17
.l9c0a equ $ + 6
db #19,#00,#17,#19,#00,#ff,#02,#19
.l9c10 equ $ + 4
db #19,#19,#19,#ff,#02,#0d,#00,#0b
.l9c19 equ $ + 5
.l9c16 equ $ + 2
db #0b,#ff,#08,#12,#ff,#02,#0b,#0d
.l9c1f equ $ + 3
db #12,#10,#ff,#02,#0b,#0d,#19,#19
.l9c25 equ $ + 1
db #ff,#01,#0d,#00,#0d,#00,#0d,#00
.l9c2e equ $ + 2
db #0d,#0d,#01,#12,#00,#12,#12,#00
.l9c37 equ $ + 3
db #00,#12,#12,#01,#14,#00,#14,#00
.l9c40 equ $ + 4
db #14,#00,#00,#14,#01,#0d,#00,#0d
.l9c49 equ $ + 5
db #0d,#00,#0d,#0d,#00,#01,#0d,#00
.l9c52 equ $ + 6
db #0d,#00,#0d,#00,#00,#0d,#01,#14
.l9c5b equ $ + 7
db #00,#14,#00,#14,#00,#19,#19,#02
.l9c60 equ $ + 4
db #0b,#0b,#0b,#0b,#01,#19,#00,#19
.l9c69 equ $ + 5
db #19,#00,#19,#19,#00,#02,#01,#03
.l9c6e equ $ + 2
db #01,#00,#01,#01,#01,#01,#01,#00
.l9c77 equ $ + 3
db #03,#01,#01,#02,#01,#01,#01,#00
.l9c7c
db #01,#01,#01,#01,#01,#00,#02,#02
.l9c85 equ $ + 1
db #02,#01,#01,#00,#01,#00,#01,#00
.l9c8e equ $ + 2
db #00,#01,#01,#03,#00,#01,#03,#00
.l9c97 equ $ + 3
db #01,#03,#00,#02,#01,#01,#01,#01
.l9c9c
db #01,#01,#00,#01,#01,#01,#01,#01
db #00,#01,#00,#04,#00,#07,#00,#0a
db #00,#18,#00,#1f,#00,#2c,#00,#2f
db #00,#32,#00,#37,#00,#3d,#00,#46
db #00,#4a,#00,#4d,#00,#51,#00,#54
db #00,#58,#00,#5b,#00,#5f,#00,#64
db #00,#73,#00,#76,#00,#79,#00,#7c
db #00,#85,#00,#8b,#00,#97,#00,#9d
db #00,#a1,#00,#a9,#00,#af,#00,#b3
db #00,#cc,#00,#e8,#00,#04,#01,#11
db #01,#18,#01,#28,#01,#2b,#01,#5a
db #01,#69,#01,#83,#01,#87,#01,#8d
db #01,#9b,#01,#a0,#01,#a6,#01,#cb
db #01,#ce,#01,#d2,#01,#d6,#01,#d9
db #01,#dd,#01,#e0,#01,#e3,#01,#e7
db #01,#ea,#01,#ed,#01,#f1,#01,#f4
db #01,#f8,#01,#fd,#01,#00,#02,#05
db #02,#09,#02,#0c,#02,#10,#02,#15
db #02,#19,#02,#1f,#02,#27,#02,#2c
db #02,#2f,#02,#32,#02,#34,#02,#36
db #02,#39,#02,#45,#02,#5b,#02,#62
db #02,#6a,#02,#72,#02,#89,#02,#8c
db #02,#90,#02,#93,#02,#97,#02,#b7
db #02,#be,#02,#c2,#02,#c8,#02,#cb
db #02,#d1,#02,#d6,#02,#da,#02,#df
db #02,#e2,#02,#e5,#02,#e8,#02,#eb
db #02,#ee,#02,#f5,#02,#f9,#02,#fc
db #02,#ff,#02,#02,#03,#05,#03,#08
db #03,#0b,#03,#0e,#03,#11,#03,#14
db #03,#18,#03,#1b,#03,#1e,#03,#21
db #03,#24,#03,#27,#03,#2f,#03,#33
db #03,#4a,#03,#4e,#03,#d3,#03,#d8
db #03,#e7,#03,#14,#04,#32,#04,#38
db #04,#3e,#04,#44,#04,#4a,#04,#50
db #04,#18,#05,#1c,#05,#20,#05,#55
db #05,#57,#05,#59,#05,#5b,#05,#5d
db #05,#5f,#05,#61,#05,#63,#05,#65
db #05,#67,#05,#69,#05,#6d,#05,#6f
db #05,#71,#05,#73,#05,#75,#05,#77
db #05,#79,#05,#7d,#05,#7f,#05,#81
db #05,#83,#05,#87,#05,#89,#05,#8b
db #05,#8d,#05,#8f,#05,#91,#05,#93
db #05,#97,#05,#9b,#05,#9d,#05,#a1
db #05,#a5,#05,#a7,#05,#a9,#05,#ab
db #05,#ad,#05,#af,#05,#b1,#05,#b3
db #05,#b5,#05,#b7,#05,#b9,#05,#bb
db #05,#bd,#05,#bf,#05,#c1,#05,#c3
db #05,#c5,#05,#c7,#05,#c9,#05,#cb
db #05,#cd,#05,#cf,#05,#d1,#05,#d3
db #05,#d5,#05,#d7,#05,#db,#05,#df
db #05,#e4,#05,#e6,#05,#e8,#05,#ea
db #05,#ec,#05,#ee,#05,#f0,#05,#f2
db #05,#f4,#05,#f6,#05,#f8,#05,#fa
db #05,#fc,#05,#fe,#05,#00,#06,#4a
db #06,#4c,#06,#4e,#06,#50,#06,#52
db #06,#54,#06,#56,#06,#58,#06,#5a
db #06,#5c,#06,#5e,#06,#60,#06,#62
db #06,#64,#06,#66,#06,#68,#06,#6a
db #06,#6c,#06,#6e,#06,#70,#06,#72
db #06,#74,#06,#76,#06,#78,#06,#ff
db #ff

.game_name
	db "Soccer Challenge",0
.game_year
	db "1990",0
.game_publisher
	db "Alternative Software",0
.music_author
	db "",0
.music_comment
	db "",0

	read "music_end_v1_0.asm"

